package wjh.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import wjh.pojo.Doctor;

public interface DoctorInfoMapper {

    @Select("select * from doctor where id=#{value}")
    Doctor findDoctorById(int id);

    @Update("update doctor set name=#{name},password=#{password},photo=#{photo},age=#{age},sex=#{sex},duty=#{duty},department=#{department},phone=#{phone},introduction=#{introduction} where id=#{id}")
    void updateInfo(Doctor doctor);

    Doctor findDoctorLogin(@Param("phone") String phone,@Param("password") String password);

    Doctor findDoctorId(@Param("phone") String phone,@Param("password") String password);

    @Select("select * from doctor where phone=#{value}")
    Doctor findDoctorRegister(String phone);

    void register(@Param("phone") String phone,@Param("password") String password);
}
